package org.jivesoftware.smack.filter;

import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Message.Type;
import org.jivesoftware.smack.packet.Packet;

public class MessageTypeFilter
  implements PacketFilter
{
  private final Message.Type type;

  public MessageTypeFilter(Message.Type paramType)
  {
    this.type = paramType;
  }

  public boolean accept(Packet paramPacket)
  {
    boolean bool;
    if (!(paramPacket instanceof Message))
      bool = false;
    while (true)
    {
      return bool;
      bool = ((Message)paramPacket).getType().equals(this.type);
    }
  }
}